package com.sz.demo.discount;

import com.sz.demo.model.Product;
import java.math.BigDecimal;

/**
 * 无折扣策略
 * @author Lenovo
 */
public class NoDiscount implements DiscountStrategy {
    @Override
    public BigDecimal applyDiscount(Product product, int quantity) {
        // 即使策略无折扣，也要应用商品自身的折扣
        final BigDecimal noCount = new BigDecimal(1);
        return product.getBasePrice().multiply(noCount);
    }
}